package cn.tedu.demo4;

import cn.tedu.demo4.controller.UserController;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Demo {
    /**
     * 容器创建时，除了指定的包进行扫描外，该包如果还含有子包，也会进行扫描
     * @param args
     */
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("cn.tedu.demo4");
        UserController user = context.getBean(UserController.class);
        user.start();

    }
}
